package com.keiou.drink.response.base;

import com.google.gson.annotations.SerializedName;
import com.keiou.drink.api.HttpCode;

import java.io.Serializable;

/**
 * Created by Bob on 2017/1/19
 */
public class HttpResult<T> implements Serializable {
    @SerializedName("code")
    private int code;

    @SerializedName("message")
    private String msg;

    public boolean hasmore;

    public T result;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isHasmore() {
        return hasmore;
    }

    public void setHasmore(boolean hasmore) {
        this.hasmore = hasmore;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public boolean isSuccess() {
        return HttpCode.SUCCESS_CODE == code;
    }
}
